<?php

/**
 * BaseCuentas
 * 
 * This class is member of the DAO layer.
 * 
 * @property integer $id
 * @property integer $idItem
 * @property integer $idCosto
 * @property integer $idMovimiento
 * @property float $importe
 * @property float $tipoCambio
 * @property integer $idMoneda
 * @property string $obs
 * @property string $fecha
 * @property Costos $Costos
 * 
 * @author     Claudio Corlatti <corlatti@gmail.com>
 *  $Id: Builder.php 8 2010-05-19 23:09:37Z corlatti@gmail.com $
 */
abstract class BaseCuentas extends Doctrine_Record {
    public function setTableDefinition()
    {
        $this->setTableName('cuentas');
        $this->hasColumn('id', 'integer', 4, array('type' => 'integer', 'length' => 4, 'primary' => true, 'autoincrement' => true));
        $this->hasColumn('idItem', 'integer', 4, array('type' => 'integer', 'length' => 4, 'notnull' => true));
        $this->hasColumn('idCosto', 'integer', 4, array('type' => 'integer', 'length' => 4, 'notnull' => true));
        $this->hasColumn('idMovimiento', 'integer', 4, array('type' => 'integer', 'length' => 4, 'notnull' => true));
        $this->hasColumn('importe', 'float', null, array('type' => 'float', 'notnull' => true));
        $this->hasColumn('tipoCambio', 'float', null, array('type' => 'float', 'notnull' => true));
        $this->hasColumn('idMoneda', 'integer', 4, array('type' => 'integer', 'length' => 4, 'notnull' => true));
        $this->hasColumn('obs', 'string', null, array('type' => 'string', 'notnull' => true));
        $this->hasColumn('fecha', 'string', null, array('type' => 'string', 'notnull' => true));
    }

    public function setUp()
    {
        $this->hasOne('Costos', array('local' => 'idCosto',
                                      'foreign' => 'id'));
    }
}
?>